import { requestHos  } from "@/utils/http";
// 1、设置医院设置的参数类型
export interface hosSetListParamsType{
    page:number;
    limit:number;
    hosname?:string;
    hoscode?:string;
}
//2医院每一项类型
export interface hosSetListItemType{
    id: number,
    createTime: string,
    updateTime: string,
    isDeleted: number,
    param: any,
    hosname: string;
    hoscode: string;
    apiUrl: string;
    signKey: string;
    contactsName: string;
    contactsPhone: string;
    status: number;
}
// 3、封装数组对象
export type hosSetListType  = hosSetListItemType[]
// 4。医院列表完整数据
export interface hosSetListDataType{
    records:hosSetListType;
    total:number;
    size:number;
    current:number;
    order:any[];
    hitCount:boolean;
    searchCount:boolean;
    pages:number
}
//请求函数1:请求医院设置的分页列表
export const reqHospitalSetList = ({page, limit, hosname, hoscode}:hosSetListParamsType) => {
  return requestHos.get<any,hosSetListDataType>(`/admin/hosp/hospitalSet/${page}/${limit}`, {
    params: {
      hosname,
      hoscode,
    },
  });
};